function request(url, type, success, error,mod = "GET") {
	dg = dialog({
		title: "加载中"
		// content: "<img style='width:20vw;' src='images/loading.gif'/>"
	});
	dg.showModal();
	const fetchObject = fetch(url, {
		method: mod
	});
	fetchObject.catch(r => {
		error(r, dg);
	});
	const t = fetchObject.then(r => r[type]());
	t.then(c => {
		success(c, dg);
	});
	t.catch((r => {
		error(r, dg);
	}))
}